sundays = 0

monthlens = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

day = 2
for year in range(1901,2001):
	if (year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)):
		monthlens[1] = 29
	else:
		monthlens[1] = 28
	for dates in monthlens:
		if (day == 0):
			sundays += 1
		day += dates
		day %= 7

print(sundays)